<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%>
<html>
<head>
  <script type="text/javascript">
  function doSearch() {
	grid.load({
		app_name_app: $('#app_name_app').val()
	});
  }
  /*新增*/
  function addHistoryApp(url){
	  commonDetail(url,"save","historyAppTableId");
  }
 /* 修改*/
  function modifyHistoryApp(url){
   commonDetail(url,"update","historyAppTableId");
  }
  /*删除*/
  function deleteHistoryApp(url){
      commonDel(url, "delete", "historyAppTableId");
  }
  var grid;
  $(document).ready(function() {
	  grid = $("#historyAppTableId").jpgrid({
			url: "getHistoryAppListJson.do",
			columns: [
				{title: "APP名称", field: "APP_NAME_APP",width:100},
                {title: "所属机构", field: "INST_NAME",width:150},
				{title: "APP类型", field: "APP_TYPE",width:100},
				{title: "版本号", field: "APP_VERSION",width:100},
				{title: "更新说明", field: "APP_DESC",width:180},
                {title: "安卓VersionCode", field: "ANDROID_VERSION_CODE",width:100},
                {title: "安卓包大小(字节)", field: "ANDROID_APK_SIZE",width:180},
                {title: "安卓MD5", field: "ANDROID_UPDATE_MD5",width:200}
			]
		});
  });

  //下载
  function downloadApk(urls){
      var checkedItems = checkSelected("historyAppTableId", true);
      if(!checkedItems){
          return;
      }
      ids = (checkedItems[0]).UUID;
      $.ajax({
          url:urls+ids,
          success:function(result){
			if(result != "null"){
			    window.open(result);
			}
          }
      });
  }

  </script>
</head>
<body class="easyui-layout list_body"  >
	<form id="historyAppForm" name="historyAppForm">
		<div class="list_body_north" data-options="region:'north'"  border="false" >
			<!-- 查询表单 -->
			<div  class="datagrid-toolbar" border="false"  >
				<span>APP名称:</span>
				<input id="app_name_app" type="text" name="app_name_app"  class="easyui-textbox"  >
				<a href="#" class="easyui-linkbutton btn" iconCls="icon-search" onclick="doSearch() ">查询</a> 
				<a href="#" class="easyui-linkbutton btn" iconCls="icon-reload" onclick="resetForm() ">重置</a>					
			</div>
			<!-- 自定义标签工具栏 -->
			<jiepos:buttonOperateTag menuCode="${menuCode}"></jiepos:buttonOperateTag>	
		</div>
		<div data-options="region:'center'" border="false"  class="list_body_center">		
			<!-- 表格 -->
			<table id="historyAppTableId" fit="true"></table>
		</div>
	</form>
</body>
</html>
